package com.apinji.common.domain.mapper;

import com.apinji.common.domain.OpenCardSmsLog;
import org.apache.ibatis.annotations.*;

/**
 * Created by 轩辕夏夏 on 2017/7/6.
 */
@Mapper
public interface OpenCardSmsLogMapper {

    @Insert("insert into apin_opencard_sms_log(id, useruuid, orderid, cardno, phoneno, createtime, version, merid, outorderid, txntime, acctype, status, memo) " +
            " values(#{id},  #{userUUID}, #{orderId}, #{cardNo}, #{phoneNo}, #{createTime}, #{version}, #{merId}, #{outOrderId}, #{txnTime}, #{accType}, #{status}, #{memo})")
    void addOneItem(OpenCardSmsLog openCardSmsLog);


    @Select("select * from apin_opencard_sms_log where id = #{id}")
    OpenCardSmsLog getOneItem(@Param("id") String id);


    @Update("update apin_opencard_sms_log set status = #{status}, memo = #{memo} where id = #{id}")
    void updateLogStatus(@Param("id") String id, @Param("status") String status, @Param("memo") String memo);
}
